import service from '@/utils/request'

// 核验数据表-查询
export const getDataSheet = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleDataSetTable/dataSetTableList',
    method: 'get',
    params: dataForm
  })
}
// 数据集列表集合
export const getDataSetList = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleDataSet/ruleDataSetList',
    method: 'get',
    params: dataForm
  })
}
// 核验数据表-保存
export const save_rule_dataset_table = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleDataSetTable/save',
    method: 'post',
    data: dataForm
  })
}
// 核验数据表-修改
export const update_rule_dataset_table = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleDataSetTable/save',
    method: 'post',
    data: dataForm
  })
}
// 核验数据表-删除
export const delete_rule_dataset_table = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleDataSetTable/delete',
    method: 'post',
    data: dataForm
  })
}
// 数据表版本
export const get_table_times = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/qaRuleDataset/getVersionList',
    method: 'post',
    data: dataForm
  })
}
// 数据字段版本
export const get_field_times = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleDataSetField/list',
    method: 'get',
    params: dataForm
  })
}
// 规则配置、分类版本
export const get_rule_times = (dataForm: any) => {
  return service({
    url: '/data-governance/dataQaRuleTemplate/time',
    method: 'get',
    params: dataForm
  })
}
// 规则配置、分类版本
export const get_rule_type_times = (dataForm: any) => {
  return service({
    url: '/data-governance/dataQaRuleType/time',
    method: 'get',
    params: dataForm
  })
}
// 数据集-表列表
export const getDataTableList = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleDataSetTable/list',
    method: 'get',
    params: dataForm
  })
}
// 核验规则表-字段
export const getTableFields = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleDataSetField/list-field',
    method: 'get',
    params: dataForm
  })
}
// 规则模板列表
export const getTableRules = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleTemplate/list-rule-template',
    method: 'get',
    params: dataForm
  })
}
// 字段-跨表核验新增
export const crossTableSave = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleMapping/moreTableCheck',
    method: 'post',
    data: dataForm
  })
}
// 核验字段查询
export const getFields = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleDataSetField/page',
    method: 'get',
    params: dataForm
  })
}
// 字段规则详情-保存
export const save_fields_detail = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleDataSetField',
    method: 'post',
    data: dataForm
  })
}
// 字段规则详情-修改
export const update_fields_detail = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleDataSetField',
    method: 'put',
    data: dataForm
  })
}
// 字段规则详情-删除
export const delete_fields_detail = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleDataSetField',
    method: 'delete',
    data: dataForm
  })
}
// 单表核验
export const singleTableSave = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleMapping/add',
    method: 'post',
    data: dataForm
  })
}
// 核验规则
export const get_verification_rules = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleTemplate/page',
    method: 'get',
    params: dataForm
  })
}
// 已选中核验规则
export const get_used_rules_List = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleTemplate/list-rule',
    method: 'post',
    params: dataForm
  })
}
// 字段核验
export const FiledRuleMapping = (dataForm: any) => {
  return service({
    url: '/data-governance/quality/ruleMapping',
    method: 'post',
    data: dataForm
  })
}
// 规则配置-保存
export const save_rule_template = (dataForm: any) => {
  return service({
    url: '/data-governance/dataQaRuleTemplate',
    method: 'post',
    data: dataForm
  })
}
// 规则配置-修改
export const update_rule_template = (dataForm: any) => {
  return service({
    url: '/data-governance/dataQaRuleTemplate',
    method: 'put',
    data: dataForm
  })
}
// 规则配置-删除
export const delete_rule_template = (dataForm: any) => {
  return service({
    url: '/data-governance/dataQaRuleTemplate',
    method: 'delete',
    data: dataForm
  })
}
// 规则配置列表
export const get_rules_config = (dataForm: any) => {
  return service({
    url: '/data-governance/dataQaRuleTemplate/page',
    method: 'get',
    params: dataForm
  })
}
// 规则分类列表
export const get_rule_type_list = (dataForm: any) => {
  return service({
    url: '/data-governance/dataQaRuleType/page',
    method: 'get',
    params: dataForm
  })
}
// 规则分类字典
export const get_rule_type_dict = (dataForm: any) => {
  return service({
    url: '/data-governance/dataQaRuleType/list',
    method: 'get',
    params: dataForm
  })
}
// 规则分类-保存
export const save_rule_type = (dataForm: any) => {
  return service({
    url: '/data-governance/dataQaRuleType',
    method: 'post',
    data: dataForm
  })
}
// 规则分类-修改
export const update_rule_type = (dataForm: any) => {
  return service({
    url: '/data-governance/dataQaRuleType',
    method: 'put',
    data: dataForm
  })
}
// 规则分类-删除
export const delete_rule_type = (dataForm: any) => {
  return service({
    url: '/data-governance/dataQaRuleType',
    method: 'delete',
    data: dataForm
  })
}
